package com.sm.honkon.ui.fragment.more

import android.os.Bundle
import com.blankj.utilcode.util.ToastUtils
import com.sm.honkon.R
import com.sm.honkon.app.base.BaseFragment
import com.sm.honkon.app.handle.BottomHandle
import com.sm.honkon.databinding.FrgPinBinding
import com.sm.honkon.ui.model.PinVIewModel
import kotlinx.android.synthetic.main.frg_pin.*
import me.hgj.jetpackmvvm.ext.nav
import me.hgj.jetpackmvvm.ext.navigateAction

/**
 * @description
 * @author csw
 * @date 2021-06-15
 */
class PinFragment : BaseFragment<PinVIewModel, FrgPinBinding>() {
    override fun layoutId(): Int = R.layout.frg_pin

    override fun initView(savedInstanceState: Bundle?) {
        mDatabind.handle = BottomHandle(nav())
        tv_login.setOnClickListener {
            if (et_pin.text.toString() == "147258") {
                nav().navigateAction(R.id.action_pinFragment_to_changjiaShezhiFragment)
            } else ToastUtils.showShort("pin码不正确")
        }
    }

}